home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Visual Basic 5.0 (2nd Edition) / Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso / Code / BUGWIZ.FRM < prev    next >
Text File  |  1997-06-14  |  4KB  |  162 lines

  1. VERSION 5.00
  2. Begin VB.Form FBugWizard 
  3.    Caption         =   "Debug Wizard"
  4.    ClientHeight    =   4920
  5.    ClientLeft      =   1410
  6.    ClientTop       =   1320
  7.    ClientWidth     =   4620
  8.    Icon            =   "BUGWIZ.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    LockControls    =   -1  'True
  11.    ScaleHeight     =   4920
  12.    ScaleWidth      =   4620
  13.    Begin VB.CommandButton cmdClose 
  14.       Caption         =   "Close"
  15.       Height          =   492
  16.       Left            =   120
  17.       TabIndex        =   10
  18.       Top             =   4200
  19.       Width           =   2052
  20.    End
  21.    Begin VB.CommandButton cmdBug 
  22.       Caption         =   "Trim Assertions"
  23.       Height          =   492
  24.       Index           =   5
  25.       Left            =   120
  26.       TabIndex        =   9
  27.       Top             =   3600
  28.       Width           =   2052
  29.    End
  30.    Begin VB.FileListBox fileCur 
  31.       Height          =   1845
  32.       Left            =   2400
  33.       Pattern         =   "*.bas;*.cls;*.frm;*.ctl"
  34.       TabIndex        =   7
  35.       Top             =   2760
  36.       Width           =   2052
  37.    End
  38.    Begin VB.DirListBox dirCur 
  39.       Height          =   1584
  40.       Left            =   2400
  41.       TabIndex        =   6
  42.       Top             =   1080
  43.       Width           =   2052
  44.    End
  45.    Begin VB.DriveListBox drvCur 
  46.       Height          =   288
  47.       Left            =   2400
  48.       TabIndex        =   5
  49.       Top             =   600
  50.       Width           =   2052
  51.    End
  52.    Begin VB.CommandButton cmdBug 
  53.       Caption         =   "Disable Profile Procedures"
  54.       Height          =   492
  55.       Index           =   2
  56.       Left            =   120
  57.       TabIndex        =   4
  58.       Top             =   1800
  59.       Width           =   2052
  60.    End
  61.    Begin VB.CommandButton cmdBug 
  62.       Caption         =   "Enable Profile Procedures"
  63.       Height          =   492
  64.       Index           =   3
  65.       Left            =   120
  66.       TabIndex        =   3
  67.       Top             =   2400
  68.       Width           =   2052
  69.    End
  70.    Begin VB.CommandButton cmdBug 
  71.       Caption         =   "Expand Assertions"
  72.       Height          =   492
  73.       Index           =   4
  74.       Left            =   120
  75.       TabIndex        =   2
  76.       Top             =   3012
  77.       Width           =   2052
  78.    End
  79.    Begin VB.CommandButton cmdBug 
  80.       Caption         =   "Enable Bug Procedures"
  81.       Height          =   492
  82.       Index           =   1
  83.       Left            =   120
  84.       TabIndex        =   1
  85.       Top             =   1200
  86.       Width           =   2052
  87.    End
  88.    Begin VB.CommandButton cmdBug 
  89.       Caption         =   "Disable Bug Procedures"
  90.       Height          =   492
  91.       Index           =   0
  92.       Left            =   120
  93.       TabIndex        =   0
  94.       Top             =   600
  95.       Width           =   2052
  96.    End
  97.    Begin VB.Label lblFileCur 
  98.       Height          =   492
  99.       Left            =   240
  100.       TabIndex        =   8
  101.       Top             =   120
  102.       Width           =   4092
  103.    End
  104. End
  105. Attribute VB_Name = "FBugWizard"
  106. Attribute VB_GlobalNameSpace = False
  107. Attribute VB_Creatable = False
  108. Attribute VB_PredeclaredId = True
  109. Attribute VB_Exposed = False
  110. Option Explicit
  111.  
  112. Public sFileCur As String
  113.  
  114. Private Sub Form_Load()
  115.     If fileCur.ListCount > 0 Then
  116.         fileCur.ListIndex = 0
  117.     End If
  118. End Sub
  119.  
  120. Private Sub cmdClose_Click()
  121.     Unload Me
  122. End Sub
  123.  
  124. Private Sub cmdBug_Click(Index As Integer)
  125.     HourGlass Me
  126.     ' CBugFilter part of object
  127.     Dim bug As CBugFilter
  128.     Set bug = New CBugFilter
  129.     ' IFilter part of object
  130.     Dim filter As IFilter
  131.     Set filter = bug
  132.     ' Set FilterType property on bug variable
  133.     bug.FilterType = Index
  134.     ' Set Source property on filter variable
  135.     filter.Source = sFileCur
  136.     ' Pass either variable to FilterTextFile
  137. #If fOddDayOfTheMonth Then
  138.     FilterTextFile bug
  139. #Else
  140.     FilterTextFile filter
  141. #End If
  142.     HourGlass Me
  143. End Sub
  144.  
  145. Private Sub dirCur_Change()
  146.     fileCur.Path = dirCur.Path
  147.     If fileCur.ListCount > 0 Then
  148.         fileCur.ListIndex = 0
  149.     End If
  150. End Sub
  151.  
  152. Private Sub drvCur_Change()
  153.     dirCur.Path = drvCur.Drive
  154. End Sub
  155.  
  156. Private Sub fileCur_Click()
  157.     lblFileCur.Caption = fileCur.filename
  158.     sFileCur = NormalizePath(fileCur.Path) & fileCur.filename
  159.     lblFileCur.Caption = sFileCur
  160. End Sub
  161.  
  162.